package com.ctgu.service.impl;

import com.ctgu.mapper.StudentMapper;
import com.ctgu.service.StudentService;
import com.ctgu.vo.Student;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StudentServiceImpl implements StudentService {
    @Resource
    StudentMapper studentMapper;

    @Override
    public int updateName(Integer id, String name) {
        Student student = new Student();
        student.setStudentId(id);
        student.setStudentName(name);
        return studentMapper.updateByPrimaryKeySelective(student);
    }
}
